import Vue from 'vue'

import 'normalize.css/normalize.css'// A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/c/index.scss' // global css
import i18n from './lang/c/index.js' // Internationalization
import App from './App'
import router from './router/index_c.js'
import store from './store/c/index.js'
import $ from 'jquery'
import '@/icons' // icon
import '@/permission_c' // permission control
import { formatCents, parseTime } from '@/utils/auth'
window.$ = $;
Vue.use(ElementUI, { i18n: (key, value) => i18n.t(key, value) })

Vue.config.productionTip = false

Vue.filter('formatNumber', function (val) {
  return formatCents(val/100, 2, 3)
})
Vue.filter('formatDate', function (val) {
  return parseTime(val, '{y}-{m}-{d}')
})
Vue.filter('formatTime', function (val) {
  return parseTime(val, '{h}:{i}')
})

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  template: '<App/>',
  components: { App }
})
